package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OBannerMapper;
import com.education.online.pojo.OBanner;
import com.education.online.service.OBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 广告位轮播 服务层实现
 *
 * @author d
 * @date 2020-06-03 13:54:47
 */
@Service
public class OBannerServiceImpl implements OBannerService {

    @Autowired
    private OBannerMapper oBannerMapper;

    //查询广告位轮播信息
    @Override
    public OBanner selectOBannerById(Integer id) {
        return oBannerMapper.selectOBannerById(id);
    }

    // 查询广告位轮播列表
    @Override
    public List<OBanner> selectOBannerList(OBanner oBanner) {
        return oBannerMapper.selectOBannerList(oBanner);
    }

    // 新增广告位轮播
    @Override
    public int insertOBanner(OBanner oBanner) {
        return oBannerMapper.insertOBanner(oBanner);
    }

    //修改广告位轮播
    @Override
    public int updateOBanner(OBanner oBanner) {
        return oBannerMapper.updateOBanner(oBanner);
    }

    //删除广告位轮播对象
    @Override
    public int deleteOBannerByIds(String ids) {
        return oBannerMapper.deleteOBannerByIds(Convert.toStrArray(ids));
    }
}